package wetogether.travelinfo.dao;

import java.sql.SQLException;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import wetogether.travelinfo.vo.TravelCommentVO;
import wetogether.travelinfo.vo.TravelFrVO;
import wetogether.travelinfo.vo.TravelImageVO;
import wetogether.travelinfo.vo.TravelInfoVO;
import wetogether.travelinfo.vo.TravelVacancyVO;
import wetogether.travelinfo.vo.TravelZoneVO;

public class InputTravelInfoDAOImpl extends SqlMapClientDaoSupport implements InputTravelInfoDAO {
	/**
	 * 0. 지역 정보 입력
	 */
	public void insertTravelZone(TravelZoneVO zoneVO) throws SQLException {
		super.getSqlMapClientTemplate().insert("travelinput.insertTravelZone",zoneVO);
	}
	/**
	 * 1. 여행지 정보 입력
	 */
	@Override
	public void insertTravelInfo(TravelInfoVO tVO) throws SQLException {
		super.getSqlMapClientTemplate().insert("travelinput.insertTravelInfo", tVO);
	}
	/**
	 * 2. 여행지의 이미지들(갤러리) 입력
	 */
	@Override
	public void insertPlaceImage(TravelImageVO imgVO) throws SQLException {
		super.getSqlMapClientTemplate().insert("travelinput.insertPlaceImage",imgVO);
	}
	/**
	 * 3. 숙박 정보 입력
	 */
	@Override
	public void insertPlaceVacancy(TravelVacancyVO vacancyVO)
			throws SQLException {
		super.getSqlMapClientTemplate().insert("travelinput.insertPlaceVacancy",vacancyVO);
	}
	/**
	 * 4. 맛집 정보 입력
	 */
	@Override
	public void insertPlaceFr(TravelFrVO frVO) throws SQLException {
		super.getSqlMapClientTemplate().insert("travelinput.insertPlaceFr",frVO);
	}
	/**
	 * 5. 공지사항 입력
	 * 		처음 입력시 호출
	 */
	@Override
	public void insertPlaceNotice(TravelInfoVO tVO) throws SQLException {
		super.getSqlMapClientTemplate().update("travelinput.insertPlaceNotice",tVO);
	}
	/**
	 * 6. 댓글 입력
	 */
	@Override
	public void insertPlaceComment(TravelCommentVO commentVO)
			throws SQLException {
		super.getSqlMapClientTemplate().insert("travelinput.insertPlaceComment",commentVO);
	}
	/**
	 * 7. 댓글이 입력될때마다 받은 추천점수를 입력
	 */
	@Override
	public void insertTravelInfoRecommend(TravelCommentVO commentVO)
			throws SQLException {
		super.getSqlMapClientTemplate().update("travelinput.insertTravelInfoRecommend",commentVO);
	}
}

